﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AffContactPerso.aspx.cs" Inherits="AffContactPerso" %>

<asp:content ContentPlaceHolderID="contenu" runat="server">
    <fieldset>
        <legend>Données Personnelles - 1/2</legend>
        <table cellspacing="2" cellpadding="5">
        <asp:panel ID="panel" runat="server" Enabled="true">          
            <tr valign="top">
                <td>
                    <asp:Label ID="lbIdentifiant" runat="server" AssociatedControlID="tbIdentifiant" Text="Identifiant : " />
                </td>
                <td>
                    <asp:TextBox ID="tbIdentifiant" runat="server" Width="250px" Enabled="False" />
                </td>
                <td rowspan="4" class="photo">
                    <asp:Image ID="iPhoto" runat="server" AlternateText="Photo du contact" Width="150px" Height="150px" />                    
                </td>
            </tr>        
            <tr>
                <td>
                    <asp:Label ID="lbCivilite" runat="server" AssociatedControlID="dlCivilite" Text="Civilité : " />
                </td>
                <td>
                    <asp:DropDownList ID="dlCivilite" runat="server">
                        <asp:ListItem Selected="True" Value="Mme"/>
                        <asp:ListItem Value="Mlle" />
                        <asp:ListItem Value="Mr" />
                    </asp:DropDownList>
                </td>                        
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbNom" runat="server" AssociatedControlID="tbNom" Text="Nom : "/>
                </td>
                <td>
                    <asp:TextBox ID="tbNom" runat="server" Width="250px"/>
                    <asp:RequiredFieldValidator ID="validationNom" runat="server" 
                        ControlToValidate="tbNom" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbPrenom" runat="server" AssociatedControlID="tbPrenom" Text="Prénom : "/>
                </td>
                <td>
                    <asp:TextBox ID="tbPrenom" runat="server" Width="250px"/>
                    <asp:RequiredFieldValidator ID="validatePrenom" runat="server" 
                        ControlToValidate="tbPrenom" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbDateNaissance" runat="server" AssociatedControlID="tbNaissance" Text="Date de naissance : " />
                </td>
                <td>
                    <asp:TextBox ID="tbNaissance" runat="server" Width="130px" />
                    
                    <img id="imgCal" src="Images/icone_calendrier.gif" alt="Cliquez ici pour afficher le calendrier" style="vertical-align:middle"  />                    
                    
                    <!-- Pour l'utilisation d'éléments Ajax dans la langue de l'utilisateur -->
                    <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true" />
                    
                    <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" 
                        TargetControlID="tbNaissance" PopupButtonID="imgCal" PopupPosition="Right" 
                        Format="dd/MM/yyyy" FirstDayOfWeek="Monday" 
                    />
                    <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
                        Mask="99/99/9999" TargetControlID="tbNaissance" MaskType="Date"
                    />                    
                </td>
                <td>
                    <asp:FileUpload ID="fuPhoto" runat="server"/>
                    <asp:Button ID="btPhoto" runat="server" Text="Modifier la photo" OnClick="btPhoto_Click"/>
                </td>  
            </tr>
             <tr>
                <td>
                    <asp:Label ID="lbAdresse" runat="server" AssociatedControlID="tbAdresse" Text="Adresse : "/>
                </td>
                <td>
                    <asp:TextBox ID="tbAdresse" runat="server" Width="250px" />
                </td>
            </tr> 
            <tr>
                <td>
                    <asp:Label ID="lbCp" runat="server" AssociatedControlID="tbCp" Text="Code postal : " />
                </td>
                <td>
                    <asp:TextBox ID="tbCp" runat="server" Width="60px"/>
                    <asp:RegularExpressionValidator ID="revCp" runat="server" 
                        ControlToValidate="tbCp" ErrorMessage="Code postale non valide" Display="Dynamic" 
                        ValidationExpression="\d{5}"
                    />
                </td>                
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbVille" runat="server" AssociatedControlID="tbVille" Text="Ville : " />
                </td>
                <td>
                    <asp:TextBox ID="tbVille" runat="server" Width="250px" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" AssociatedControlID="tbTelephone" Text="Téléphone : "/>
                </td>
                <td>
                    <asp:TextBox ID="tbTelephone" runat="server" Width="130px" />
                    <asp:RequiredFieldValidator ID="validateTel" runat="server" 
                        ControlToValidate="tbTelephone" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbEmail" runat="server" AssociatedControlID="tbEmail" Text="Email : " />
                </td>
                <td>
                    <asp:TextBox ID="tbEmail" runat="server" Width="250px" />
                    <asp:RequiredFieldValidator ID="validateEmail" runat="server" 
                        ControlToValidate="tbEmail" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revEmail" runat="server" 
                            ControlToValidate="tbEmail" ErrorMessage="Email non valide" Display="Dynamic"
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                    />
                </td>
                <td>
                    <asp:ImageButton ID="btEmail" runat="server" onclick="btEmail_Click" src="Images/icone-enveloppe.gif" alt="Cliquez ici pour envoyer un mail à ce destinataire"/>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbInteret" runat="server" Text="Intéret(s) : "/>
                </td>
                <td colspan="2">
                    <asp:CheckBox ID="cbMusique" runat="server" Text="Musique" />
                    &nbsp;
                    <asp:CheckBox ID="cbBricolage" runat="server" Text="Bricolage" />
                    &nbsp;
                    <asp:CheckBox ID="cbJardinage" runat="server" Text="Jardinage" />
                </td>
            </tr>
            </asp:panel>
            <tr>
                <td align="center" colspan="2">
                    <asp:Button ID="btAnnuler" runat="server" Text="Annuler" onclick="btAnnuler_Click" CausesValidation="false" type="image"/>                
                    <asp:Button ID="btSuivant" runat="server" Text="Suivant &gt;&gt;" onclick="btSuivant_Click" />    
                </td>
            </tr>            
        </table>
    </fieldset>
</asp:content>